package com.peg.rules;

import com.peg.dataobjects.Context;

/**
 * @author sad
 */
public class PushString extends Rule {

    private String toBePushed;

    public PushString(String str) {
        toBePushed = str;
    }

    @Override
    public boolean execute(Context context) {
        context.getStack().Push(toBePushed);
        return true;
    }

    @Override
    public String toString() {
        return "PushString ["+toBePushed+"]";
    }
}
